package com.ruoyi.project.jiaqin.questionlikes.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.jiaqin.questionlikes.mapper.MemberQuestionLikesMapper;
import com.ruoyi.project.jiaqin.questionlikes.domain.MemberQuestionLikes;
import com.ruoyi.project.jiaqin.questionlikes.service.IMemberQuestionLikesService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 用户点赞问题Service业务层处理
 *
 * @author admin
 * @date 2021-02-02
 */
@Service
public class MemberQuestionLikesServiceImpl implements IMemberQuestionLikesService
{
    @Autowired
    private MemberQuestionLikesMapper memberQuestionLikesMapper;

    /**
     * 查询用户点赞问题
     *
     * @param memberId 用户点赞问题ID
     * @return 用户点赞问题
     */
    @Override
    public MemberQuestionLikes selectMemberQuestionLikesById(String memberId,String questionId)
    {
        return memberQuestionLikesMapper.selectMemberQuestionLikesById(memberId,questionId);
    }

    /**
     * 查询用户点赞问题列表
     *
     * @param memberQuestionLikes 用户点赞问题
     * @return 用户点赞问题
     */
    @Override
    public List<MemberQuestionLikes> selectMemberQuestionLikesList(MemberQuestionLikes memberQuestionLikes)
    {
        return memberQuestionLikesMapper.selectMemberQuestionLikesList(memberQuestionLikes);
    }

    /**
     * 新增用户点赞问题
     *
     * @param memberQuestionLikes 用户点赞问题
     * @return 结果
     */
    @Override
    public int insertMemberQuestionLikes(MemberQuestionLikes memberQuestionLikes)
    {
        return memberQuestionLikesMapper.insertMemberQuestionLikes(memberQuestionLikes);
    }

    /**
     * 修改用户点赞问题
     *
     * @param memberQuestionLikes 用户点赞问题
     * @return 结果
     */
    @Override
    public int updateMemberQuestionLikes(MemberQuestionLikes memberQuestionLikes)
    {
        return memberQuestionLikesMapper.updateMemberQuestionLikes(memberQuestionLikes);
    }

    /**
     * 删除用户点赞问题对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteMemberQuestionLikesByIds(String ids)
    {
        return memberQuestionLikesMapper.deleteMemberQuestionLikesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除用户点赞问题信息
     *
     * @param memberId 用户点赞问题ID
     * @return 结果
     */
    @Override
    public int deleteMemberQuestionLikesById(String memberId)
    {
        return 0;
    }
}
